home *** CD-ROM | disk | FTP | other *** search
- // copyright 1993 Michael B. Johnson; some portions copyright 1994, MIT
- // see COPYRIGHT for reuse legalities
- //
-
- #import <appkit/appkit.h>
- #import <3Dkit/3Dkit.h>
- #import <math.h>
- #import "WW3DCamera.h"
- #import "Protocol_WWRenderable.h"
-
- @interface RIBCommand : Object < WWRenderable >
- {
- RtBound boundingBox;
- BOOL dirtyBoundingBox;
- int howManyPoints; // note that each subclass should set this appropriately...
- int n;
- RtToken *tokens;
- char **archiveVector;
- int *printfNVector;
- int *printfTypeVector;
- RtPointer *parms;
-
- id myShape; // this is a pointer to the shape which has this
- // RIBCommand embedded in it. In order to calculate it's
- // bounding box, it needs access to the 4x4s of this shape.
- }
-
- - (void)setN:(int)newN tokens:(RtToken *)newTokens parms:(RtPointer *)newParms
- archiveVector:(char **)newArchiveVector printfTypeVector:(int *)newPrintfTypeVector printfNVector:(int *)newPrintfNVector;
-
- - (int)n;
- - (RtToken *)tokens;
- - (RtPointer *)parms;
- - (char **)archiveVector;
- - (int *)printfNVector;
- - (int *)printfTypeVector;
- - getBoundingBox:(RtBound *)bbox;
-
- - setMyShape:shape;
- - shape;
-
- // the next two routines should only be used by subclasses...
- - writeParameterList:(NXStream *)stream;
- - writeParameterListForInventor:(NXStream *)stream atTabLevel:(int)tab;
-
- @end
-
- #define PI (3.1415926535897932384626433)
- // just for name space niceness, I use wwPI also...
- #define wwPI (3.1415926535897932384626433)
- #define DtoR (wwPI/180.0)
- #define RtoD (180.0/wwPI)
- #define toDegrees(r) ((r)*RtoD)
- #define toRadians(d) ((d)*DtoR)
- #define RI_BEZIER "bezier"
- #define RI_BSPLINE "b-spline"
-